import request from '../utils/request'

//获取系统用户分页列表数据
export function listEmployee(query){
    return request({
        url:'/admin/employee/list',
        method:'get',
        params:query
    })
}

//新增员工
export function addEmployee(data){
    return request({
        url:'/admin/employee/add',
        method:'post',
        data:data
    })
}

//删除员工
export function delEmployee(id){
    return request({
        url:'/admin/employee/' +  id,
        method:'delete'
    })
}

//获取员工信息
export function getEmployee(id){
    return request({
        url:'/admin/employee/'+id,
        method:'get'
    })
}
//修改员工信息
export function updateEmployee(data){
    return request({
        url:'/admin/employee/update',
        method:'put',
        data:data
    })
}
//根据username搜索员工信息
export function EmployeeInfoUsername(username){
    return request({
        url:'/admin/employee/select?username=' + username,
        method:'get'
    })
}